package com.econ.powercloud.ems.common.enums;

/**
 * @author zjr
 * @create 2021/7/23 上午10:30
 * @description 功率反送状态
 */
public enum InversePowerOutputType implements EnumMethod{
    NO(0, "否"),
    YES(1, "是");

    private Integer code;
    private String desc;

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    InversePowerOutputType(int code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static String getCodeFromCode(int code){
        for(InversePowerOutputType type: InversePowerOutputType.values()){
            if(type.getCode() == code){
                return type.getDesc();
            }
        }
        return null;
    }

}
